﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<ModelNameValue<string,Code.Models.Issue>>" %>

<%@ Import Namespace="Code.Models" %>
<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	历史开奖号码
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

<fieldset>
    <legend><%=Html.DropDownList("ddlLotteryList",(IEnumerable<SelectListItem>)ViewData["LotteryTypeList"],new {onchange="ddl_Change(this)"}) %>开奖号码</legend>
    <table class="table" width="100%">
        <tr>
            <th>期号</th><th>开奖号码</th><th>开始时间</th>
        </tr>
        <% var i = 0; foreach (var item in Model)
           {
               %>
                <tr <%=i++%2==0?"class='supersede'":"" %>>
                    <td><%=item.Key %></td>
                    <td><%=item.Value.OpenCode %></td>
                    <td><%=item.Value.StartTime %></td>
                </tr>
               <%
           }
            if (Model.Count > 0)
            {
                var page=(PageInfo)ViewData["More_PageInfo"];
            %>
                <tr>
                    <td colspan='3'>
                        <%=Html.Pager(page.CurrPage,page.PageCount,page.SunCount,"Page.CurrPage",Url.Route(new {id=ViewData["LotteryTypeID"],Page=page}),"Page.PageCount") %>
                    </td>
                </tr>
           <%} %>
    </table>
</fieldset>

</asp:Content>

<asp:Content ID="Content3" ContentPlaceHolderID="StyleAndScript" runat="server">
<script type="text/javascript">
    function ddl_Change(obj) {
        var url = '<%=Url.Action("More",new {id=""})%>';
        document.location.href = '<%=Url.Content("~/Play/More/") %>'+obj.value;
    }
</script>
</asp:Content>
